<?php
	include("../Action/config.php");
	
	$json = urldecode(file_get_contents("php://input"));
	$arrayJson = json_decode($json,true);
	
	$reg_id = $arrayJson['registrationId'];
	$parent_num = $arrayJson['parent_num'];		
	
	$sql = "UPDATE PARENT SET reg_id = '$reg_id' WHERE parent_num = '$parent_num'";
	$result = mysql_query($sql);
	
	if($result == '1'){ // success to insert data into DB
		echo "success";
	}else{ // fail to insert data into DB
		echo "fail";
	}
?>